﻿using System;
using Microsoft.Extensions.Configuration;

namespace IotS.MessageServiceTest
{
    class Program
    {
        public static IConfigurationRoot Configuration { get; private set; }

        static void Main(string[] args)
        {
            BuildConfiguration();

            var service = new SubService();
            service.Start();

            Console.ReadKey();
        }

        private static void BuildConfiguration()
        {
            var builder = new ConfigurationBuilder()
                .SetBasePath(AppContext.BaseDirectory)
                .AddJsonFile("appsettings.json", true, true)
                .AddEnvironmentVariables();

            Configuration = builder.Build();
        }
    }
}
